//package com.yuanlun.elasticsearch.repository;
//
//import com.yuanlun.elasticsearch.entity.Movies;
//import org.springframework.data.domain.Page;
//import org.springframework.data.domain.Pageable;
//import org.springframework.data.elasticsearch.annotations.Query;
//import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
//
//import java.util.List;
//
//public interface MoviesRespository extends ElasticsearchRepository<Movies,String> {
//
//    List<Movies> findByTitle(String title);
//
//    Page<Movies> findByTitleAndGenre(String title,String genre,Pageable pageable);
//
//    Page<Movies> findByTitleIn(List<String> titles, Pageable pageable);
//
//    Page<Movies> findByTitleAndYearBetween(String title,Integer begin,Integer end,Pageable pageable);
//
//    @Query("{\n" +
//            "    \"bool\": {\n" +
//            "      \"must\": [\n" +
//            "        {\n" +
//            "          \"query_string\": {\n" +
//            "            \"default_field\": \"title\",\n" +
//            "            \"query\": \"?0\",\n" +
//            "            \"default_operator\": \"OR\"\n" +
//            "          }\n" +
//            "        },\n" +
//            "        {\n" +
//            "          \"match\": {\n" +
//            "            \"genre\": \"?1\"\n" +
//            "          }\n" +
//            "        }\n" +
//            "      ]\n" +
//            "    }\n" +
//            "  }")
//    List<Movies> get(String title,String genre);
//}
